package at.fhj.ase;

import java.math.BigDecimal;

public class ShoppingCartMain {
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		ShoppingCart myCart = new ShoppingCart();
		Article a1 = new Article(100, "HP 8630w", "Notebook HP 8630w", new BigDecimal("1299.99"));
		Article a2 = new Article(101, "MS Office 2010", "MS Office 2010 Professional", new BigDecimal("59.90") );
		myCart.addToCart(a1, new BigDecimal("1290.50"), 5);
		myCart.addToCart(a2, new BigDecimal("50"), 2);
		System.out.println(myCart.toString());
		System.out.println("ShoppingCart total Sum: " + myCart.getTotalSum());
		
		// remove pos
		ShoppingCartPos posToRemove = myCart.getShoppingCartList().get(1);
		myCart.removeFromCart(posToRemove);
		System.out.println(myCart.toString());
		System.out.println("ShoppingCart total Sum: " + myCart.getTotalSum());
	}
}
